<div class="content">
	<ul class="breadcrumb">
		<li><i class="fa fa-home"></i>
			<li>业务管理</li>
		</li>
		<li>工量管理</li>
	</ul>
	<div class="box">
		<div class="filterForm">
			<ul class="clearfix">
				<li>开始时间：
					<input type="text" id="startRegDate" style="width:110px" class="startdate" onchange="" onfocus="MyDatePicker()" ng-model="data.serviceStartTime" />
				</li>
				<li>结束时间：
					<input type="text" id="startRegDate" style="width:110px" class="startdate" onchange="" onfocus="MyDatePicker()" ng-model="data.serviceEndTime" />
				</li>
				<li>人员名称：<input type="text" style="width:125px" placeholder="请输入人员名称" ng-model="data.staffName"></li>
				<li>客户名称：<input type="text" style="width:125px" placeholder="请输入客户名称" ng-model="data.patientName"></li>
				<li>人员性质：
					<select ng-model="data.personType">
							<option value="">全部</option>
							<option value="1">在编</option>
							<option value="2">加盟</option>
					</select>
				</li>
				<li>工种：
					<select ng-model="data.workTypeId">
							<option value="">全部</option>
							<option ng-repeat="wtItem in workTypeList" value="{{wtItem.id}}">{{wtItem.workTypeName}}</option>
					</select>
				</li>
				<li>结算状态：
					<select ng-model="data.settleStatus">
							<option value="">全部</option>
							<option value="1">已结算</option>
							<option value="2">已关账</option>
					</select>
				</li>
				
				<li><button type="button" class="searchbtn" ng-click="query()" ng-if="ops['O_WORKQUANITY_QUERY']"><i class="fa fa-search"></i>&nbsp查询</button></li>
				<li><button type="button" class="searchbtn" ng-click="reset()"><i class="fa fa-refresh"></i>&nbsp重置</button></li>
			</ul>
		</div>
		<div class="signList">
			<table class="tablelist">
				<thead>
					<tr>
						<th class="cell-seq">人员编号</th>
						<th class="cell-number">人员名称</th>						
						<th class="cell-number">服务项目</th>
						<th class="cell-seq">工种</th>
						<th class="cell-seq">人员性质</th>
						<th class="cell-seq">客户名称</th>
						<th class="cell-seq">结算状态</th>
						<th class="cell-text">开始时间</th>
						<th class="cell-text">结束时间</th>
						<th class="cell-seq">小时数</th>
						<th class="cell-number">地址</th>					
						<th class="cell-seq">结算款(元)</th>
						<th class="cell-seq">调整金额(元)</th>
						<th class="cell-seq">提成比例</th>
						<th class="cell-text">操作</th>
					</tr>
				</thead>
				<tbody ng-repeat="staff in staffList">
					<tr ng-repeat="item in staff.items">
						<td class="cell-seq">{{item.staffId}}</td>
						<td class="cell-number">{{item.staffName}}</td>						
						<td class="cell-number">{{item.serviceName}}</td>
						<td class="cell-seq">{{item.workTypeName}}</td>
						<td class="cell-seq">{{item.personType |PersonTypeFilter}}</td>	
						<td class="cell-seq">{{item.patientName}}</td>
						<td class="cell-seq">{{item.settleStatus | SettleStatusFilter}}</td>
						<td class="cell-text">{{item.serviceStartTime| date:'yyyy-MM-dd HH:mm:ss'}}</td>
						<td class="cell-text">{{item.serviceEndTime| date:'yyyy-MM-dd HH:mm:ss'}}</td>
						<td class="cell-seq">{{item.serviceDuration}}</td>
						<td class="cell-number">{{item.inpatientArea}}/{{item.inpatientWard}}</td>
						<td class="cell-seq">{{item.staffSettleAmt| number:2}}</td>
						<td class="cell-seq">{{item.settleAdjustAmt| number:2}}</td>
						<td class="cell-seq">{{item.settleRatio}}</td>
						
						<td class="cell-text">
							<button type="button" class="btn btn-warning" ng-click="popup(item)" ng-if="ops['O_WORKQUANITY_ADJUST']&&item.settleStatus==2">
								<i class="fa fa-pencil-square-o fa-lg"></i>&nbsp调整
							</button>
						</td>
					</tr>
					<tr style="background-color: #D1EAF9;">
						<td class="cell-seq">小计</td>
						<td class="cell-number"></td>
						<td class="cell-number"></td>
						<td class="cell-seq"></td>
						<td class="cell-seq"></td>	
						<td class="cell-seq">{{staff.summaryCustomer}}人</td>
						<td class="cell-seq"></td>
						<td class="cell-text"></td>
						<td class="cell-text"></td>
						<td class="cell-seq">{{staff.summaryHours}}</td>
						<td class="cell-number"></td>
						<td class="cell-seq">{{staff.summarySSAmt| number:2}}</td>
						<td class="cell-seq"></td>
						<td class="cell-seq"></td>
						<td class="cell-text"></td>
					</tr>
				</tbody>
				<tfoot>
					<tr style="background-color: #D1EAF9;">
						<td class="cell-seq">总计</td>
						<td class="cell-number"></td>
						<td class="cell-number"></td>
						<td class="cell-seq"></td>
						<td class="cell-seq"></td>	
						<td class="cell-seq">{{totalCustomer}}人</td>
						<td class="cell-seq"></td>
						<td class="cell-text"></td>
						<td class="cell-text"></td>
						<td class="cell-seq">{{totalHours}}</td>
						<td class="cell-number"></td>
						<td class="cell-seq">{{totalSSAmt| number:2}}</td>
						<td class="cell-seq"></td>
						<td class="cell-seq"></td>
						<td class="cell-text"></td>
					</tr>
				</tfoot>
			</table>
		</div>
	</div>
</div>
<script type="text/ng-template" id="wqPopup.html"> 
	<div class="content" style="margin:0;">
		<ul class="breadcrumb">
			<li>
				<i class="fa fa-home"></i>
				<li>业务管理</li>
			</li>
			<li>工量管理</li>
			<li>调整金额</li>
			<i class="fa fa-times" aria-hidden="true" ng-click="close()" style="float: right;font-size: 36px;color: #8aafe4;margin-right: -15px;margin-top: -5px;"></i>
		</ul>
		<div class="box" style="float: left;">
			<ng-form class="formgroup" name="serForm">			
			<div class="formrow">
				<label class="labtext-left"><sup class="required-flag">*</sup>调整结算款(元)</label> <input type="number"  ng-model="data.adjustAmt"  maxlength="100" placeholder="请输入调整金额" required="required"/>
			</div>
			
			<div class="fllab">
				<input type="submit" class="submit" value="确认" ng-click="adjust()" ng-disabled="serForm.$invalid" />
			</div>
		</ng-form>
		</div>
	</div>
</script>